<% form_for(@post) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :icon_url %><br />
    <%= f.text_field :icon_url %>
  </p>
  <p>
    <%= f.label :post_category_id %><br />
    <%= f.select :post_category_id, array_of(PostCategory) %>
  </p>
  <p>
    <%= f.label :sector_id %><br />
    <%= f.select :sector_id, array_of(Sector) %>
  </p>
  <p>
    <%= f.label :summary %><br />
    <%= f.text_field :summary %>
  </p>
  <p>
    <%= f.label :content %><br />
    <%= f.text_area :content %>
  </p>
  <p>
    <%= f.label :tags %><br />
    <%= f.text_field :tags %>
  </p>
  <p>
    <%= f.label :created_by %><br />
    <%= f.text_field :created_by %>
  </p>
  <p>
    <%= f.submit @post.new_record? ? 'Create' : 'Update' %>
  </p>
<% end %>